package edu.tjufe.llp.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import edu.tjufe.llp.entity.ChargeRecord;
import org.apache.ibatis.annotations.Param;

/**
 * 充电记录Mapper接口
 * 
 * @author llp
 * @date 2022-12-25
 */
public interface ChargeRecordMapper extends BaseMapper<ChargeRecord>
{
    /**
     * 查询充电记录
     * 
     * @param recordId 充电记录主键
     * @return 充电记录
     */
    public ChargeRecord selectChargeRecordByRecordId(Integer recordId);

    /**
     * 查询充电记录列表
     * 
     * @param chargeRecord 充电记录
     * @return 充电记录集合
     */
    public List<ChargeRecord> selectChargeRecordList(ChargeRecord chargeRecord);

    /**
     * 新增充电记录
     * 
     * @param chargeRecord 充电记录
     * @return 结果
     */
    public int insertChargeRecord(ChargeRecord chargeRecord);

    /**
     * 修改充电记录
     * 
     * @param chargeRecord 充电记录
     * @return 结果
     */
    public int updateChargeRecord(ChargeRecord chargeRecord);

    /**
     * 删除充电记录
     * 
     * @param recordId 充电记录主键
     * @return 结果
     */
    public int deleteChargeRecordByRecordId(Integer recordId);

    /**
     * 批量删除充电记录
     * 
     * @param recordIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteChargeRecordByRecordIds(Integer[] recordIds);

    Page<ChargeRecord> findPage(Page<ChargeRecord> page, @Param("carId")Integer carId, @Param("stationId")Integer stationId);
}
